{yun:}include file="$comstyle/header.htm"{/yun}
<div class="w1000">
<div class="admin_mainbody">
{yun:}include file="$comstyle/left.htm"{/yun}
<div class=right_box>
	<div id="grow_freedom" class="grow_mod_wrap my_freedom" style="padding:0px;border:none;">
    
      <div class="member_data">
        <div class="member_data_left">
          <div class="member_data_left_name">尊敬的企业用户：</div>
          <div class="mt10">您当前是：<span class="comindex_money_pd_s">{yun:}$statis.rating_name{/yun}</span></div>
          	
          	<div class="member_data_tip mt10">
          		服务到期为：
          	{yun:}if $statis.vip_etime > time(){/yun}
           		
           		{yun:}$statis.vip_stime|date_format:'%Y-%m-%d'{/yun} - {yun:}$statis.vip_etime|date_format:'%Y-%m-%d'{/yun}
           		
        	{yun:}else if $statis.vip_etime==0{/yun}
         		
         		{yun:}$statis.vip_stime|date_format:'%Y-%m-%d'{/yun} - 永久
         		
         	{yun:}else{/yun}
           		
           		{yun:}$statis.vip_stime|date_format:'%Y-%m-%d'{/yun} - <span class="comindex_money_pd_s">{yun:}$statis.vip_etime|date_format:'%Y-%m-%d'{/yun}</span> <a href="index.php?c=right" class="cblue">立即开通</a>
           		
        	{yun:}/if{/yun}
        	</div>
        	 
       		
        </div>
        <div class="member_data_right">
          <ul>
            <li><span class="member_data_right_n">{yun:}if $statis.rating_type!='2'{/yun}{yun:}$statis.job_num{/yun}{yun:}else{/yun}不限{yun:}/if{/yun}</span>
              <div class="member_data_right_p">剩余职位数</div>
            </li>
            <li><span class="member_data_right_n">{yun:}if $statis.rating_type!='2'{/yun}{yun:}$statis.down_resume{/yun}{yun:}else{/yun}不限{yun:}/if{/yun}</span>
              <div class="member_data_right_p">剩余简历数</div>
            </li>
            <li><span class="member_data_right_n">{yun:}if $statis.rating_type!='2'{/yun}{yun:}$statis.invite_resume{/yun}{yun:}else{/yun}不限{yun:}/if{/yun}</span>
              <div class="member_data_right_p">剩余邀请数</div>
            </li>
          </ul>
        </div>
	</div>
    
    
    
    
    
    <div class="admincont_box mt20">
      <div class="package_tit"><span class="com_tit_span">选择适合您的企业VIP套餐</span></div>
   	<iframe id="fdingdan"  name="fdingdan" onload="returnmessage('fdingdan');" style="display:none"></iframe>
    
  
        <div class="report_uaer_list fl">
        	<ul>
			    {yun:}if $config.com_vip_type==2{/yun}
			    <li><a href="index.php?c=right" >套餐会员</a></li>
                {yun:}/if{/yun}
                 
                {yun:}if $config.com_vip_type==1{/yun}
			    <li><a href="index.php?c=right&act=time" >时间会员</a></li> 
                {yun:}/if{/yun}
                
                {yun:}if $config.com_vip_type==0{/yun}
			    <li><a href="index.php?c=right" >套餐会员</a></li>               
			    <li><a href="index.php?c=right&act=time" >时间会员</a></li> 
                {yun:}/if{/yun}
                
                
                <li class="report_uaer_list_cur"><a href="index.php?c=right&act=added" >增值包</a></li> 
                <li><a href="index.php?c=ad" >广告位推广</a></li> 
            </ul>
		</div>
        <div class="clear"></div>
           <div class="Value_added_pd">
        <div class="Value_added">
	        <div class="Value_added_mune">  
		        <ul class="Value_added_mune_left">
		        	{yun:}foreach from=$rows item=v key=key{/yun}
					<li {yun:}if $smarty.get.id==$v.id||($smarty.get.id==''&&$key<1){/yun}class="Value_added_mune_cur"{yun:}/if{/yun}><a href="index.php?c=right&act=added&id={yun:}$v.id{/yun}">{yun:}$v.name{/yun}</a><i class="Value_added_bg"></i></li>
					{yun:}/foreach{/yun}
		        </ul>
	        </div>
            <div class="Value_added_box"> 
            <div class="clear"></div>
			{yun:}if $info{/yun}
        	<table class="added_de_box_table" cellpadding="0" cellspacing="0">
           		<tbody>
	           		<tr>
	           			<th>套餐内容</th><th  align="center"><div style="width:65px">套餐价</div></th><th align="center"><div style="width:85px">会员价格</div></th>
	           		</tr>
	           		{yun:}foreach from=$info item=v{/yun}
	                <tr>
                   
	           			<td>
	           				<label>
                            <div class="added_cont_b">
	                    	<input type="radio" name="service_package" value="{yun:}$v.id{/yun}" onclick="toChange()" class="added_cont_radio"/>
	                    	{yun:}if $v.resume{/yun}<span class="added_cont_s">下载简历：<i class="com_dt_rage">{yun:}$v.resume{/yun}份</i>，</span>{yun:}/if{/yun}
	                    	{yun:}if $v.interview{/yun}<span class="added_cont_s">邀请面试：<i class="com_dt_rage">{yun:}$v.interview{/yun}份</i>，</span>{yun:}/if{/yun}
	                    	{yun:}if $v.job_num{/yun}<span class="added_cont_s">发布职位：<i class="com_dt_rage">{yun:}$v.job_num{/yun}份</i>，</span>{yun:}/if{/yun}
	                    	{yun:}if $v.breakjob_num{/yun}<span class="added_cont_s">刷新职位：<i class="com_dt_rage">{yun:}$v.breakjob_num{/yun}份</i>，</span>{yun:}/if{/yun} 
	                    	
	                    	{yun:}if $v.part_num{/yun}<span class="added_cont_s">发布兼职：<i class="com_dt_rage">{yun:}$v.part_num{/yun}份</i>，</span>{yun:}/if{/yun} 
	                    	{yun:}if $v.breakpart_num{/yun}<span class="added_cont_s">刷新兼职：<i class="com_dt_rage">{yun:}$v.breakpart_num{/yun}份</i>，</span>{yun:}/if{/yun} 
	                    	{yun:}if $v.lt_job_num{/yun}<span class="added_cont_s">发布猎头职位：<i class="com_dt_rage">{yun:}$v.lt_job_num{/yun}份</i>，</span>{yun:}/if{/yun} 
	                    	{yun:}if $v.lt_breakjob_num{/yun}<span class="added_cont_s">刷新猎头职位：<i class="com_dt_rage">{yun:}$v.lt_breakjob_num{/yun}份</i>，</span>{yun:}/if{/yun} 
	                    	{yun:}if $v.lt_resume{/yun}<span class="added_cont_s">下载高级简历：<i class="com_dt_rage">{yun:}$v.lt_resume{/yun}份</i>，</span>{yun:}/if{/yun} 
                            </div>
	                    	</label>
	                    </td>
	           			<td align="center"><span class="">{yun:}$v.service_price{/yun}</span>元</td>
	           			<td align="center">
	           				<span class="added_de_box_table_jg">{yun:}if $discount.service_discount{/yun}{yun:}$v.service_price*$discount.service_discount*0.01{/yun}{yun:}else{/yun}{yun:}$v.service_price{/yun}{yun:}/if{/yun}</span> 元 
	           				<div class="added_de_box_table_jgyh">{yun:}if $discount.service_discount{/yun}专享{yun:}0.1*$discount.service_discount{/yun}折优惠{yun:}/if{/yun} </div> 
	           			</td>
                     
	         		</tr>  
	         		{yun:}/foreach{/yun}
           		</tbody>
           	</table>
			
			{yun:}if $config.com_integral_online==3{/yun}
            <div class="added_de_box_fk">
				账户{yun:}$config.integral_pricename{/yun}：<span class="added_de_box_fk_je">{yun:}$statis.integral{/yun}</span> {yun:}$config.integral_pricename{/yun}
				（1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
 			</div>  
			{yun:}/if{/yun}

			<div class="added_de_box_fk">
				
				应付{yun:}if $config.com_integral_online==3{/yun}{yun:}$config.integral_pricename{/yun}：{yun:}else{/yun}金额：{yun:}/if{/yun}
				{yun:}if $config.com_integral_online==3{/yun}
					<span id="price" class="added_de_box_fk_je">0</span> {yun:}$config.integral_pricename{/yun}
				{yun:}else{/yun}
					<span id="price" class="added_de_box_fk_je">0</span> 元
				{yun:}/if{/yun}
 
			</div>

			{yun:}if $config.com_integral_online==1{/yun}
				<div class="added_de_box_fk">
					抵扣{yun:}$config.integral_pricename{/yun}：<input type="text" id="dkjf" onkeyup="checkNum('{yun:}$statis.integral{/yun}','{yun:}$config.integral_proportion{/yun}');" oninput="myFunction(this)" class="com_jf_text">
				</div>
				<div class="added_de_box_fk">
					账户{yun:}$config.integral_pricename{/yun}：{yun:}$statis.integral{/yun}（1元 = {yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun}）
				</div>
			{yun:}/if{/yun}

			<div class="added_de_box_fk dkh_div" style="display:none">抵扣{yun:}$config.integral_pricename{/yun}后消费金额：
				<span class="added_de_box_fk_je" id="price_dk"></span> 元
			</div>

            <div class="added_de_box_fk">
				<form name="alipayment" target="fdingdan" action="index.php?c=pay&act=dingdan" method="post" id="myform1">
					<input type="hidden" value="" id="comserviceid" name="comservice"/>
					<input type="hidden" value="" id="dkjf2" name="dkjf"/>
					<input type="hidden" value="" id="dkprice" name="dkprice"/>
					<input type="hidden" id="logid" name="logid" />
					<div id="zf_div" {yun:}if $config.com_integral_online ==3{/yun} style="display:none"{yun:}/if{/yun}>
						<a href="javascript:buyvip();" class="added_de_box_bth">立即购买</a>
					</div>
					<div id="zf_div2" {yun:}if $config.com_integral_online !=3{/yun} style="display:none"{yun:}/if{/yun}>
						<a href="javascript:qrzf();" class="added_de_box_bth">立即购买</a>
					</div>
				</form>
            </div>
			{yun:}else{/yun}
			<div class="msg_no"><p>亲爱的用户，目前没有增值包服务</p></div>
			{yun:}/if{/yun}
            <div class="clear"></div> 
        
		</div>
        </div>
	</div>
	</div>
	</div>
</div>
</div>
<script>

function accAdd(arg1,arg2){ 
	var r1,r2,m; 
	try{r1=arg1.toString().split(".")[1].length}catch(e){r1=0} 
	try{r2=arg2.toString().split(".")[1].length}catch(e){r2=0} 
	m=Math.pow(10,Math.max(r1,r2)) 
	return (arg1*m+arg2*m)/m 
} 
function accSub(arg1,arg2){ 
	return accAdd(arg1,-arg2); 
} 
function accMul(arg1, arg2) {
	var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
	try { m += s1.split(".")[1].length } catch (e) { }
	try { m += s2.split(".")[1].length } catch (e) { }
	return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
}
function accDiv(arg1,arg2){    
	var t1=0,t2=0,r1,r2;    
	try{t1=arg1.toString().split(".")[1].length}catch(e){}    
	try{t2=arg2.toString().split(".")[1].length}catch(e){}    
	with(Math){        
		r1=Number(arg1.toString().replace(".",""));        
		r2=Number(arg2.toString().replace(".",""));        
		return (r1/r2)*pow(10,t2-t1);    
	}
}
function myFunction(_this) {
    _this.value = _this.value.replace(/[^0-9]/g, '');
}

function toChange(){
	var online = '{yun:}$config.com_integral_online{/yun}';
 
	var obj  = document.getElementsByName('service_package');
    for(var i=0;i<obj.length;i++){
        if(obj[i].checked==true){
			$("#dkjf").val('');
 			$(".dkh_div").hide();
        	{yun:}foreach from=$info item=v{/yun}
				if(obj[i].value=='{yun:}$v.id{/yun}'){
					if(online==3){
						document.getElementById('price').innerHTML='{yun:}if $discount.service_discount{/yun}{yun:}$v.service_price*$discount.service_discount*0.01*$config.integral_proportion{/yun}{yun:}else{/yun}{yun:}$v.service_price*$config.integral_proportion{/yun}{yun:}/if{/yun}';
					}else{
						document.getElementById('price').innerHTML='{yun:}if $discount.service_discount{/yun}{yun:}$v.service_price*$discount.service_discount*0.01{/yun}{yun:}else{/yun}{yun:}$v.service_price{/yun}{yun:}/if{/yun}';
					}
					
					document.getElementById('comserviceid').value='{yun:}$v.id{/yun}';
					
					$("#dkprice").val({yun:}if $discount.service_discount{/yun} {yun:}$v.service_price*$discount.service_discount*0.01{/yun} {yun:}else{/yun} {yun:}$v.service_price{/yun} {yun:}/if{/yun});

				}	
            {yun:}/foreach{/yun}
        }
    }
	
}

function checkNum(integral,integral_pro){
	var dkjf = $("#dkjf").val();
 	if(dkjf){
		$(".dkh_div").show();
	} 
	var price = $("#price").text();
	var need_jifen = accMul(price, integral_pro);

  	if(parseInt(integral) >= parseInt(need_jifen)){
		if(parseInt(dkjf) > parseInt(need_jifen)){
			$("#dkjf").val(parseInt(need_jifen));
			var dkjfh = accSub(price , accDiv(need_jifen,integral_pro));
		}else{
			var dkjfh = accSub(price, accDiv(dkjf,integral_pro));
		}	
 	}else{
		if(parseInt(dkjf) > parseInt(integral)){
			$("#dkjf").val(parseInt(integral));
			var dkjfh = accSub(price , accDiv(integral,integral_pro));
		}else{
			var dkjfh = accSub(price, accDiv(dkjf,integral_pro));
 		}
 	}
 		if(dkjfh<=0){
			$("#price_dk").html(0);
			$("#zf_div").hide();
			$("#zf_div2").show();
		}else{
			$("#price_dk").html(dkjfh);
			$("#dkjf2").val(dkjf);
			$("#dkprice").val(dkjfh);
			$("#zf_div").show();
			$("#zf_div2").hide();
		}
 	 
	 	
}

function qrzf(){
	var index = layer.load('执行中，请稍候...',0);

	var logid = $("#logid").val();
	var tcid = $("#comserviceid").val();
	if(tcid==''){
		layer.closeAll();
		layer.msg("请选择增值服务",2,8);
		return false;
	}
	
	var price = $("#price").text();

 	var url = "index.php?c=pay&act=dkzf";
 	
	$.post(url,{tcid:tcid,price:price,logid:logid},function(data){
		layer.closeAll('loading');
		if(data){
			data=eval('('+data+')'); 
			if(data.error==1){
				if(data.url){
					layer.msg(data.msg, 2,8,function(){
						window.location.href=data.url;
					});
				}else{
					layer.msg(data.msg, 2,8);
				}
     			
     		}else if(data.error==0){
     			layer.msg(data.msg, 2,9,function(){
					window.location.href='index.php?c=paylogtc';
				}); 
    		}
		}
	})
}


function buyvip(){
	var tcid = $("#comserviceid").val();
	if(tcid==''){
		layer.closeAll();
		layer.msg("请选择增值服务",2,8);
		return false;
	}
	$('#myform1').submit();
}
</script>
<script>
 	var second = 0;
	window.setInterval(function () {
		second ++;
	}, 1000);

	var url     = location.href, 
		refer   = document.referrer, 
		timeIn  = Math.ceil(new Date().getTime()/1000); 
	var opera   = 44; 
 	$(function(){ 
		setTimeout(function(){ 
			$.post('index.php?c=log',{url:url,refer:refer,timeIn:timeIn,second:2,opera:opera},function(data){
				if(data){
					$("#logid").val(data);
				}
			})
		},2000);
		
    }) 
	
	window.onbeforeunload = function(){ 
		var logid = $("#logid").val();
 		if(second>2){ 
			$.post('index.php?c=log&act=gxLog',{id:logid,second:second},function(data){
				if(data) {
					return false;
				}
			})
		}
   	}
</script>
{yun:}include file="$comstyle/footer.htm"{/yun}
